package com.kehongborui.portal.web;

import com.kehongborui.data.domain.User;
import com.kehongborui.portal.model.UserModel;
import com.kehongborui.portal.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-09-20
 */
@RestController
@RequestMapping("/user")
@Api(tags = "用户信息", description = "tteteststetetetet")
public class UserCtrl {
    @Autowired
    private UserService userService;

    @ApiOperation("创建用户")
    @PostMapping
    public UserModel save(@RequestBody UserModel user) {
        return userService.save(user);
    }

    public static void main(String[] args) {
        int i = 0;
        i = ++i;
        System.out.println(i);
    }
}
